package com.ruoyi.sgsc.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

public class orderlist extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /** 用户id */
    private Long userId;
    /** 订单id */
    @Excel(name = "订单id")
    private Long orderId;
    /** 商品id */
    private Long productId;
    /** 商品名 */
    @Excel(name = "商品名")
    private String productName;
    /** 数量 */
    @Excel(name = "数量")
    private Long quantity;
    /** 商品价格 */
    @Excel(name = "商品价格")
    private BigDecimal price;

    /** 总价 */
    @Excel(name = "总价")
    private BigDecimal totalPrice;

    /** 支付方式 */
    @Excel(name = "支付方式")
    private String paymentMethod;
    /** 订单创建时间 */

    /** 商品图片 */
    @Excel(name = "商品图片")
    private String imageUrl;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date date;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Long getQuantity() {
        return quantity;
    }

    public void setQuantity(Long quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }
    public void setImageUrl(String imageUrl)
    {
        this.imageUrl = imageUrl;
    }

    public String getImageUrl()
    {
        return imageUrl;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("userId", getUserId())
                .append("orderId", getOrderId())
                .append("productId", getProductId())
                .append("productName", getProductName())
                .append("quantity", getQuantity())
                .append("price", getPrice())
                .append("totalPrice", getTotalPrice())
                .append("paymentMethod", getPaymentMethod())
                .append("date", getDate())
                .append("imageUrl",getImageUrl())
                .toString();
    }
}
